<?php

class myUser extends sfGuardSecurityUser
{
    //
    public function hasPermission($perm_name){
        if($this->isAnonymous())
            return false;
        else
            return $this->getGuardUser()->hasPermission ($perm_name);
    }
    public function hasRelPermission($perm_name, $sf_user)
    {
        if($this->isAnonymous())
            return false;
        else
            return $this->getGuardUser()->hasRelPermission($perm_name, $sf_user);

    }
    public function hasActualCharacter(){
        if($this->isAnonymous())
                return false;
        return $this->getGuardUser()->hasActualCharacter();
    }
    public function getId(){
        if($this->isAnonymous())
            return 0;
        else
            return $this->getGuardUser()->getId();
    }
      public function is($rel_user){
          if($this->isAnonymous())
                  return false;
          else
              return $this->getGuardUser()->getId() == $rel_user->getId();
      
    }
}
